<!-- komponen Modal -->
<div class="modal fade" id="pop_komponen" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div id="popup_pembayaran"></div>
		</div>
	</div>
</div>
<!-- end komponen modal -->
<div id="page-wrapper">
    <!-- /.row -->
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="judul-page">Atur Tarif Pembayaran Bulanan</span>
                    <span class="pull-right">
						<a href="<?php echo site_url('set_pembayaran_bulanan/lembaga');?>" class="btn btn-warning btn-xs"><span class="glyphicon glyphicon-plus"></span>&nbsp;Kembali</a>
                        <a href="<?php echo site_url('set_pembayaran_bulanan/add/'.$id_lembaga);?>" class="btn btn-warning btn-xs"><span class="glyphicon glyphicon-plus"></span>&nbsp;Tambah Data</a>
                    </span>
                    <div class="clearfix"></div>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                      <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="50">#</th>
                                <th>Tahun Pelajaran</th>
								
                                <th width="100">Aksi</th>
                            </tr>
                        </thead>
                        <tbody>
						<?php 
							$i = 1+$offset; 
							foreach ($hasil as $row) {
						
						?>										
                            <tr>
                                <td><?php echo $i++ ?></td>
                                <td><?php echo $row['th_ajaran']; ?></td>
								
                                <td>
								<a class="btn btn-info btn-xs" href="" data-toggle="modal" data-target="#pop_komponen" onclick="show_popup('<?php echo $row['id_tapel'];?>','<?php echo $id_lembaga?>')" ><span class="glyphicon glyphicon-file"></span></a>
                                   <?php
									if($row['cek_bayar']==false){
								   ?>
                                    <a href="<?php echo site_url('set_pembayaran_bulanan/edit/'.$id_lembaga.'/'.$row['id_tapel']);?>" class="btn btn-success btn-xs" title="Edit"><span class="glyphicon glyphicon-edit"></span></a>
									<a href="<?php echo site_url('set_pembayaran_bulanan/delete/'.$id_lembaga.'/'.$row['id_tapel']);?>" class="btn btn-danger btn-xs" title="Hapus"><span class="glyphicon glyphicon-trash"></span></a>
									<?php
									}
									?>
								   
                                    
                                </td>
                            </tr>
						<?php
							}
						?>
                        </tbody>
                      </table>
                    </div>
                    <div class="clearfix"></div>
                    
 <?php
echo ! empty($pagination) ? '<center><ul class="pagination">' . $pagination . '</ul></center>' : '';
?>
                </div>
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /#page-wrapper -->
<script type="text/javascript">
    /*$('#saudaraModal').modal(options);
    $('#ortuModal').modal(options);
    $('#editSModal').modal(options);*/	
	
	function show_popup(id_tapel,id_lembaga){
		$.ajax({
			type: "POST",
			url : "<?php echo site_url(); ?>set_pembayaran_bulanan/detail",
			data: "id_tapel="+id_tapel+"&id_lembaga="+id_lembaga,
			cache: false,
			success: function(response) {
				$('#popup_pembayaran').html(response);
			}
		});
		return false;
	}	
</script>